import { getConfigPath } from '../utils.js';
import { UpdateOrchestrator } from './UpdateOrchestrator/index.js';
import { categorizeFiles } from './categorizeFiles.js';
export const prebuild = async (contentDirectoryPath) => {
    if (process.env.IS_MULTI_TENANT === 'true') {
        console.log('Skipping prebuild in multi-tenant mode.');
        return;
    }
    const configPath = await getConfigPath(contentDirectoryPath);
    if (configPath == null) {
        throw Error('Must be run in a directory where a mint.json file exists.');
    }
    const { contentFilenames, staticFilenames, openApiFiles, snippets, snippetsV2 } = await categorizeFiles(contentDirectoryPath);
    await UpdateOrchestrator.update(contentDirectoryPath, staticFilenames, openApiFiles, contentFilenames, snippets, snippetsV2);
};
export * from './categorizeFiles.js';
export * from './UpdateOrchestrator/index.js';
export * from '../createPage/index.js';
export * from '../createPage/preparseMdx/index.js';
